package com.cn.front.feign;

import com.cn.common.pojo.NewsModel;
import com.cn.common.pojo.ResultModel;
import com.cn.front.feign.fallBack.NewsForHomeFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Primary;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Primary
@FeignClient(value = "news",fallback = NewsForHomeFallBack.class)
public interface NewsForHomeFeign {
    @GetMapping("news/news")
    ResultModel news();
    @GetMapping("news/newsByType")
    ResultModel newsByType(@RequestParam("type") int type);
    @GetMapping("news/newsForNews")
    ResultModel newsForNews();
    @GetMapping("news/newsForId")
    ResultModel newsForId(@RequestParam("id") int id);
    @GetMapping("nitem/nitem")
    ResultModel nitem();
}
